import request from '@/utils/request'

// 查询型材批次明细列表
export function listBatch(query) {
  return request({
    url: '/line/production/batch/his/list',
    method: 'get',
    params: query
  })
}

// 查询型材批次明细详细
export function getBatch(id) {
  return request({
    url: '/line/production/batch/his/' + id,
    method: 'get'
  })
}

// 新增型材批次明细
export function addBatch(data) {
  return request({
    url: '/line/production/batch/his',
    method: 'post',
    data: data
  })
}
//
// // 修改型材批次明细
// export function updateBatch(data) {
//   return request({
//     url: '/line/production/batch/his/',
//     method: 'put',
//     data: data
//   })
// }

// 删除型材批次明细
export function delBatch(id) {
  return request({
    url: '/line/production/batch/his/' + id,
    method: 'delete'
  })
}

// 导出型材批次明细
export function exportBatch(query) {
  return request({
    url: '/line/production/batch/his/export',
    method: 'get',
    params: query
  })
}


// 获取型材批次明细
export function getBatchDetails(query) {
  return request({
    url: '/line/production/batch/his/getDetails',
    method: 'get',
    params: query
  })
}
